<%@ Page Language="C#" Inherits="Castle.MonoRail.Views.AspView.ViewAtDesignTime<IPostView>" %>
<%@ Import namespace="KenEgozi.Com.Weblog.Interfaces"%>
<%@ Import namespace="KenEgozi.Com.Weblog.Helpers"%>
<%@ Import namespace="KenEgozi.Com.Domain.Aggregates.Post"%>

<subView:One></subView:One>
<div class="PostBrief">
	<%=view.DivHelper.RoundedOpenTag() %>

	<h5 id="commentstart">Comments:</h5>
	<%foreach (Comment comment in view.Comments) { %>
		<subView:.Comments.View Comment="<%=comment%>"></subView:.Comments.View>
		<%if (view.NewComment != null) {%>
		<subView:.Comments.Pending></subView:.Comments.Pending>
		<%} %>
	<%} %>
	<div id="NewCommentZone">
		<form action="~/Comments/Add.aspx" method="post" onsubmit="postComment(this); return false;">
		<fieldset>
			<div id="Personal">
				<label for="name"><span class="must">*</span> Name: </label>
				<input type="text" name="comment.name" id="name" value="<%=view.CommenterName %>" /><br />
				<label for="email">Email: </label>
				<input type="text" name="comment.email" id="email" value="<%=view.CommenterEmail %>"/><br />
				<span>Your email address would not be shown on the site</span><br />
				<label for="homepage">Homepage: </label>
				<input type="text" name="comment.homepage" id="homepage" value="<%=view.CommenterHomepage %>" /><br />
				<div class="Break"></div>
			</div>
			<input type="checkbox" name="rememberMe" id="rememberMe" />
			<label for="rememberMe">Remember me</label> <br />
			<br />
			<span>Comment (some html is allowed)</span><br />
			<textarea name="comment.content" id="content" cols="60" rows="10"></textarea><br />
			<%if (view.UseCaptcha) { %>
			<img src="~/Images/Captcha.aspx" /><br />
			<label for="captcha">Enter the code shown above: </label>
			<input type="text" name="captcha" id="captcha" /><br />
			<%} %>
			<input type="hidden" name="commentPermalink" value="<%=view.Post.Permalink%>" />
			<input type="submit" value="Post comment" />
			<div class="ErrorMessage"></div>
		</fieldset>
		</form>
	</div>
	<%=view.DivHelper.RoundedCloseTag() %>
</div>

<component:CaptureFor id="AdditionalScriptTag">
<script type="text/javascript" src="~/Assets/Scripts/prototype_1.5.1.js"></script>
<script type="text/javascript" src="~/Assets/Scripts/postComment.js"></script>
</component:CaptureFor>
<component:CaptureFor id="AtomLinkTag">
	<link rel="alternate" type="application/atom+xml" title="kenegozi action='post'" href="http://feeds.feedburner.com/kenegozi" />
</component:CaptureFor>
